package com.yangfan.cloudalibaba.controller;

import com.yangfan.cloudalibaba.domain.Order;
import com.yangfan.cloudalibaba.service.OrderService;
import com.yangfan.springcloud.entities.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping(value = "/order/create")
    CommonResult createOrder(Order order){
        orderService.create(order);
        return new CommonResult<>(200,"下单成功");
    }


}
